package shiyan3;

public class PC {
	 private CPU cpu;
	    private HardDisk HD;

	    public void setCPU(CPU c) {
	        cpu = c;
	    }

	    public void setHardDisk(HardDisk h) {
	        HD = h;
	    }

	    public void show() {
	        System.out.println("CPU的速度为: " + cpu.getSpeed());
	        System.out.println("硬盘的容量是: " + HD.getAmount());
	    }

}
